home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEM / D-H / Effects Specialist.sea / EffectsSpecialistDemo™.rsrc / FYps_1002_ArcTools < prev    next >
Text File  |  1991-06-19  |  3KB  |  51 lines

  1. /inarcNEXT { /totKern totKern KernArray kerncount get add FXChar stringwidth pop add def
  2.   360 KernArray kerncount get mul  2 WorkRad mul Pi mul  div  rotate
  3.   /kerncount kerncount 1 add def } def
  4. /outarcNEXT { /totKern totKern KernArray kerncount get add FXChar stringwidth pop add def
  5.   360 KernArray kerncount get mul  2 WorkRad mul Pi mul  div  neg rotate
  6.   /kerncount kerncount 1 add def } def
  7. /CalcRadius { ClipStrg numeric
  8.   { /Raid ClipStrg cvr def }
  9.   { /Raid FXText stringwidth pop KernNet add 2 div Pi div FontSize
  10.     TextDirection (In) eq {3 div add}
  11.       { TextDirection (Out) eq {4 div sub} {pop} ifelse } ifelse def
  12.     } ifelse } def
  13. /FindHalfAng { /HalfCharWidth FXChar stringwidth pop 2 div def
  14.   360 HalfCharWidth mul  2 WorkRad mul Pi mul  div  } def
  15. /Justify { stringwidth pop /Ww2 exch def /Rr2 exch def
  16.   TextJustify (Left) eq { /Ww2 0 def } if
  17.   TextJustify (Centre) eq { /Ww2 Ww2 KernNet add 2 div def } if
  18.   TextJustify (Right) eq { /Ww2 Ww2 KernNet add def } if
  19.   360 Ww2 mul  2 Rr2 mul Pi mul  div } def
  20. /OutChar { FXChar exch 0 exch put  /HalfAng FindHalfAng def
  21.   gsave HalfAng neg rotate Raid 0 translate -90 rotate
  22.     FXChar stringwidth pop 2 div neg 0 moveto FXChar GrafProc
  23.   grestore HalfAng 2 mul neg rotate outarcNEXT } def
  24. /InChar  { FXChar exch 0 exch put  /HalfAng FindHalfAng def
  25.   gsave HalfAng rotate Raid 0 translate 90 rotate
  26.     FXChar stringwidth pop 2 div neg 0 moveto FXChar GrafProc
  27.   grestore HalfAng 2 mul rotate  inarcNEXT } def
  28. /OutCText { /WorkRad Raid FontSize 4 div add def
  29.   gsave CirclePlace WorkRad FXText Justify add rotate
  30.     kR FXText { OutChar } forall  grestore } def
  31. /InCText { /WorkRad Raid FontSize 3 div sub def
  32.   gsave CirclePlace WorkRad FXText Justify sub rotate
  33.     kR FXText { InChar }  forall  grestore } def
  34. /DoArcLayerWithGrafProc {
  35.   TextDirection (In)  eq { InCText  } if
  36.   TextDirection (Out) eq { OutCText } if } def
  37. /AngleOf { stringwidth pop 2 WorkRad mul Pi mul div 360 mul } def
  38. /RotClock  { gsave HalfAng 2 div neg rotate  Raid 0 translate -90 HalfAng -2 div add rotate
  39.     FXChar stringwidth pop 2 div neg 0 moveto FXChar GrafProc grestore HalfAng neg rotate } def
  40. /RotCClock { gsave HalfAng 2 div rotate  Raid 0 translate 90 HalfAng 2 div add rotate
  41.     FXChar stringwidth pop 2 div neg 0 moveto FXChar GrafProc grestore HalfAng rotate } def
  42. /CalcSpiral { /Whirls Raid Complexity mul 25 div .5 add cvi def
  43.   /AvgSize FXText stringwidth pop FXText length div def /TotalAngle 0 def
  44.   /N Raid 2 mul Pi mul AvgSize div def
  45.   /WorkRad Raid FontSize TextDirection (In) eq { 3 div sub } { 4 div add } ifelse def
  46.   } def
  47. /DoSpiralLayerWithGrafProc { FXChar exch 0 exch put  /HalfAng FXChar AngleOf def
  48.   TextDirection (In) eq { RotCClock inarcNEXT } { RotClock outarcNEXT } ifelse
  49.   DeltaScale dup scale    } def
  50. /WhirlForAll { Whirls { kR FXText { DoSpiralLayerWithGrafProc } forall } repeat } def
  51.